Option Strict On
Option Explicit On 

Public Class UDataTable
    Inherits System.Windows.Forms.UserControl

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    Friend WithEvents txtTableName As System.Windows.Forms.TextBox
    Friend WithEvents lblTableName As System.Windows.Forms.Label
    Friend WithEvents lblPrefix As System.Windows.Forms.Label
    Friend WithEvents txtPrefix As System.Windows.Forms.TextBox
    Friend WithEvents lblNamespace As System.Windows.Forms.Label
    Friend WithEvents txtNamespace As System.Windows.Forms.TextBox
    Friend WithEvents cboLocale As System.Windows.Forms.ComboBox
    Friend WithEvents lblLocale As System.Windows.Forms.Label
    Friend WithEvents chkCaseSensitive As System.Windows.Forms.CheckBox
    Friend WithEvents nudMinimumCapacity As System.Windows.Forms.NumericUpDown
    Friend WithEvents lblMinimumCapacity As System.Windows.Forms.Label
    Friend WithEvents lblPrimaryKey As System.Windows.Forms.Label
    Friend WithEvents lstPrimaryKey As System.Windows.Forms.CheckedListBox
    Friend WithEvents ErrorProvider1 As System.Windows.Forms.ErrorProvider
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(UDataTable))
        Me.txtTableName = New System.Windows.Forms.TextBox
        Me.lblTableName = New System.Windows.Forms.Label
        Me.lblPrimaryKey = New System.Windows.Forms.Label
        Me.nudMinimumCapacity = New System.Windows.Forms.NumericUpDown
        Me.lblMinimumCapacity = New System.Windows.Forms.Label
        Me.lblPrefix = New System.Windows.Forms.Label
        Me.txtPrefix = New System.Windows.Forms.TextBox
        Me.lblNamespace = New System.Windows.Forms.Label
        Me.txtNamespace = New System.Windows.Forms.TextBox
        Me.cboLocale = New System.Windows.Forms.ComboBox
        Me.lblLocale = New System.Windows.Forms.Label
        Me.chkCaseSensitive = New System.Windows.Forms.CheckBox
        Me.lstPrimaryKey = New System.Windows.Forms.CheckedListBox
        Me.ErrorProvider1 = New System.Windows.Forms.ErrorProvider
        CType(Me.nudMinimumCapacity, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'txtTableName
        '
        Me.txtTableName.AccessibleDescription = resources.GetString("txtTableName.AccessibleDescription")
        Me.txtTableName.AccessibleName = resources.GetString("txtTableName.AccessibleName")
        Me.txtTableName.Anchor = CType(resources.GetObject("txtTableName.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.txtTableName.AutoSize = CType(resources.GetObject("txtTableName.AutoSize"), Boolean)
        Me.txtTableName.BackgroundImage = CType(resources.GetObject("txtTableName.BackgroundImage"), System.Drawing.Image)
        Me.txtTableName.Dock = CType(resources.GetObject("txtTableName.Dock"), System.Windows.Forms.DockStyle)
        Me.txtTableName.Enabled = CType(resources.GetObject("txtTableName.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.txtTableName, resources.GetString("txtTableName.Error"))
        Me.txtTableName.Font = CType(resources.GetObject("txtTableName.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.txtTableName, CType(resources.GetObject("txtTableName.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.txtTableName, CType(resources.GetObject("txtTableName.IconPadding"), Integer))
        Me.txtTableName.ImeMode = CType(resources.GetObject("txtTableName.ImeMode"), System.Windows.Forms.ImeMode)
        Me.txtTableName.Location = CType(resources.GetObject("txtTableName.Location"), System.Drawing.Point)
        Me.txtTableName.MaxLength = CType(resources.GetObject("txtTableName.MaxLength"), Integer)
        Me.txtTableName.Multiline = CType(resources.GetObject("txtTableName.Multiline"), Boolean)
        Me.txtTableName.Name = "txtTableName"
        Me.txtTableName.PasswordChar = CType(resources.GetObject("txtTableName.PasswordChar"), Char)
        Me.txtTableName.RightToLeft = CType(resources.GetObject("txtTableName.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.txtTableName.ScrollBars = CType(resources.GetObject("txtTableName.ScrollBars"), System.Windows.Forms.ScrollBars)
        Me.txtTableName.Size = CType(resources.GetObject("txtTableName.Size"), System.Drawing.Size)
        Me.txtTableName.TabIndex = CType(resources.GetObject("txtTableName.TabIndex"), Integer)
        Me.txtTableName.Text = resources.GetString("txtTableName.Text")
        Me.txtTableName.TextAlign = CType(resources.GetObject("txtTableName.TextAlign"), System.Windows.Forms.HorizontalAlignment)
        Me.txtTableName.Visible = CType(resources.GetObject("txtTableName.Visible"), Boolean)
        Me.txtTableName.WordWrap = CType(resources.GetObject("txtTableName.WordWrap"), Boolean)
        '
        'lblTableName
        '
        Me.lblTableName.AccessibleDescription = resources.GetString("lblTableName.AccessibleDescription")
        Me.lblTableName.AccessibleName = resources.GetString("lblTableName.AccessibleName")
        Me.lblTableName.Anchor = CType(resources.GetObject("lblTableName.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.lblTableName.AutoSize = CType(resources.GetObject("lblTableName.AutoSize"), Boolean)
        Me.lblTableName.Dock = CType(resources.GetObject("lblTableName.Dock"), System.Windows.Forms.DockStyle)
        Me.lblTableName.Enabled = CType(resources.GetObject("lblTableName.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.lblTableName, resources.GetString("lblTableName.Error"))
        Me.lblTableName.Font = CType(resources.GetObject("lblTableName.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.lblTableName, CType(resources.GetObject("lblTableName.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.lblTableName, CType(resources.GetObject("lblTableName.IconPadding"), Integer))
        Me.lblTableName.Image = CType(resources.GetObject("lblTableName.Image"), System.Drawing.Image)
        Me.lblTableName.ImageAlign = CType(resources.GetObject("lblTableName.ImageAlign"), System.Drawing.ContentAlignment)
        Me.lblTableName.ImageIndex = CType(resources.GetObject("lblTableName.ImageIndex"), Integer)
        Me.lblTableName.ImeMode = CType(resources.GetObject("lblTableName.ImeMode"), System.Windows.Forms.ImeMode)
        Me.lblTableName.Location = CType(resources.GetObject("lblTableName.Location"), System.Drawing.Point)
        Me.lblTableName.Name = "lblTableName"
        Me.lblTableName.RightToLeft = CType(resources.GetObject("lblTableName.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.lblTableName.Size = CType(resources.GetObject("lblTableName.Size"), System.Drawing.Size)
        Me.lblTableName.TabIndex = CType(resources.GetObject("lblTableName.TabIndex"), Integer)
        Me.lblTableName.Text = resources.GetString("lblTableName.Text")
        Me.lblTableName.TextAlign = CType(resources.GetObject("lblTableName.TextAlign"), System.Drawing.ContentAlignment)
        Me.lblTableName.Visible = CType(resources.GetObject("lblTableName.Visible"), Boolean)
        '
        'lblPrimaryKey
        '
        Me.lblPrimaryKey.AccessibleDescription = resources.GetString("lblPrimaryKey.AccessibleDescription")
        Me.lblPrimaryKey.AccessibleName = resources.GetString("lblPrimaryKey.AccessibleName")
        Me.lblPrimaryKey.Anchor = CType(resources.GetObject("lblPrimaryKey.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.lblPrimaryKey.AutoSize = CType(resources.GetObject("lblPrimaryKey.AutoSize"), Boolean)
        Me.lblPrimaryKey.Dock = CType(resources.GetObject("lblPrimaryKey.Dock"), System.Windows.Forms.DockStyle)
        Me.lblPrimaryKey.Enabled = CType(resources.GetObject("lblPrimaryKey.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.lblPrimaryKey, resources.GetString("lblPrimaryKey.Error"))
        Me.lblPrimaryKey.Font = CType(resources.GetObject("lblPrimaryKey.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.lblPrimaryKey, CType(resources.GetObject("lblPrimaryKey.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.lblPrimaryKey, CType(resources.GetObject("lblPrimaryKey.IconPadding"), Integer))
        Me.lblPrimaryKey.Image = CType(resources.GetObject("lblPrimaryKey.Image"), System.Drawing.Image)
        Me.lblPrimaryKey.ImageAlign = CType(resources.GetObject("lblPrimaryKey.ImageAlign"), System.Drawing.ContentAlignment)
        Me.lblPrimaryKey.ImageIndex = CType(resources.GetObject("lblPrimaryKey.ImageIndex"), Integer)
        Me.lblPrimaryKey.ImeMode = CType(resources.GetObject("lblPrimaryKey.ImeMode"), System.Windows.Forms.ImeMode)
        Me.lblPrimaryKey.Location = CType(resources.GetObject("lblPrimaryKey.Location"), System.Drawing.Point)
        Me.lblPrimaryKey.Name = "lblPrimaryKey"
        Me.lblPrimaryKey.RightToLeft = CType(resources.GetObject("lblPrimaryKey.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.lblPrimaryKey.Size = CType(resources.GetObject("lblPrimaryKey.Size"), System.Drawing.Size)
        Me.lblPrimaryKey.TabIndex = CType(resources.GetObject("lblPrimaryKey.TabIndex"), Integer)
        Me.lblPrimaryKey.Text = resources.GetString("lblPrimaryKey.Text")
        Me.lblPrimaryKey.TextAlign = CType(resources.GetObject("lblPrimaryKey.TextAlign"), System.Drawing.ContentAlignment)
        Me.lblPrimaryKey.Visible = CType(resources.GetObject("lblPrimaryKey.Visible"), Boolean)
        '
        'nudMinimumCapacity
        '
        Me.nudMinimumCapacity.AccessibleDescription = resources.GetString("nudMinimumCapacity.AccessibleDescription")
        Me.nudMinimumCapacity.AccessibleName = resources.GetString("nudMinimumCapacity.AccessibleName")
        Me.nudMinimumCapacity.Anchor = CType(resources.GetObject("nudMinimumCapacity.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.nudMinimumCapacity.Dock = CType(resources.GetObject("nudMinimumCapacity.Dock"), System.Windows.Forms.DockStyle)
        Me.nudMinimumCapacity.Enabled = CType(resources.GetObject("nudMinimumCapacity.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.nudMinimumCapacity, resources.GetString("nudMinimumCapacity.Error"))
        Me.nudMinimumCapacity.Font = CType(resources.GetObject("nudMinimumCapacity.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.nudMinimumCapacity, CType(resources.GetObject("nudMinimumCapacity.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.nudMinimumCapacity, CType(resources.GetObject("nudMinimumCapacity.IconPadding"), Integer))
        Me.nudMinimumCapacity.ImeMode = CType(resources.GetObject("nudMinimumCapacity.ImeMode"), System.Windows.Forms.ImeMode)
        Me.nudMinimumCapacity.Location = CType(resources.GetObject("nudMinimumCapacity.Location"), System.Drawing.Point)
        Me.nudMinimumCapacity.Maximum = New Decimal(New Integer() {10000, 0, 0, 0})
        Me.nudMinimumCapacity.Name = "nudMinimumCapacity"
        Me.nudMinimumCapacity.RightToLeft = CType(resources.GetObject("nudMinimumCapacity.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.nudMinimumCapacity.Size = CType(resources.GetObject("nudMinimumCapacity.Size"), System.Drawing.Size)
        Me.nudMinimumCapacity.TabIndex = CType(resources.GetObject("nudMinimumCapacity.TabIndex"), Integer)
        Me.nudMinimumCapacity.TextAlign = CType(resources.GetObject("nudMinimumCapacity.TextAlign"), System.Windows.Forms.HorizontalAlignment)
        Me.nudMinimumCapacity.ThousandsSeparator = CType(resources.GetObject("nudMinimumCapacity.ThousandsSeparator"), Boolean)
        Me.nudMinimumCapacity.UpDownAlign = CType(resources.GetObject("nudMinimumCapacity.UpDownAlign"), System.Windows.Forms.LeftRightAlignment)
        Me.nudMinimumCapacity.Visible = CType(resources.GetObject("nudMinimumCapacity.Visible"), Boolean)
        '
        'lblMinimumCapacity
        '
        Me.lblMinimumCapacity.AccessibleDescription = resources.GetString("lblMinimumCapacity.AccessibleDescription")
        Me.lblMinimumCapacity.AccessibleName = resources.GetString("lblMinimumCapacity.AccessibleName")
        Me.lblMinimumCapacity.Anchor = CType(resources.GetObject("lblMinimumCapacity.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.lblMinimumCapacity.AutoSize = CType(resources.GetObject("lblMinimumCapacity.AutoSize"), Boolean)
        Me.lblMinimumCapacity.Dock = CType(resources.GetObject("lblMinimumCapacity.Dock"), System.Windows.Forms.DockStyle)
        Me.lblMinimumCapacity.Enabled = CType(resources.GetObject("lblMinimumCapacity.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.lblMinimumCapacity, resources.GetString("lblMinimumCapacity.Error"))
        Me.lblMinimumCapacity.Font = CType(resources.GetObject("lblMinimumCapacity.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.lblMinimumCapacity, CType(resources.GetObject("lblMinimumCapacity.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.lblMinimumCapacity, CType(resources.GetObject("lblMinimumCapacity.IconPadding"), Integer))
        Me.lblMinimumCapacity.Image = CType(resources.GetObject("lblMinimumCapacity.Image"), System.Drawing.Image)
        Me.lblMinimumCapacity.ImageAlign = CType(resources.GetObject("lblMinimumCapacity.ImageAlign"), System.Drawing.ContentAlignment)
        Me.lblMinimumCapacity.ImageIndex = CType(resources.GetObject("lblMinimumCapacity.ImageIndex"), Integer)
        Me.lblMinimumCapacity.ImeMode = CType(resources.GetObject("lblMinimumCapacity.ImeMode"), System.Windows.Forms.ImeMode)
        Me.lblMinimumCapacity.Location = CType(resources.GetObject("lblMinimumCapacity.Location"), System.Drawing.Point)
        Me.lblMinimumCapacity.Name = "lblMinimumCapacity"
        Me.lblMinimumCapacity.RightToLeft = CType(resources.GetObject("lblMinimumCapacity.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.lblMinimumCapacity.Size = CType(resources.GetObject("lblMinimumCapacity.Size"), System.Drawing.Size)
        Me.lblMinimumCapacity.TabIndex = CType(resources.GetObject("lblMinimumCapacity.TabIndex"), Integer)
        Me.lblMinimumCapacity.Text = resources.GetString("lblMinimumCapacity.Text")
        Me.lblMinimumCapacity.TextAlign = CType(resources.GetObject("lblMinimumCapacity.TextAlign"), System.Drawing.ContentAlignment)
        Me.lblMinimumCapacity.Visible = CType(resources.GetObject("lblMinimumCapacity.Visible"), Boolean)
        '
        'lblPrefix
        '
        Me.lblPrefix.AccessibleDescription = resources.GetString("lblPrefix.AccessibleDescription")
        Me.lblPrefix.AccessibleName = resources.GetString("lblPrefix.AccessibleName")
        Me.lblPrefix.Anchor = CType(resources.GetObject("lblPrefix.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.lblPrefix.AutoSize = CType(resources.GetObject("lblPrefix.AutoSize"), Boolean)
        Me.lblPrefix.Dock = CType(resources.GetObject("lblPrefix.Dock"), System.Windows.Forms.DockStyle)
        Me.lblPrefix.Enabled = CType(resources.GetObject("lblPrefix.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.lblPrefix, resources.GetString("lblPrefix.Error"))
        Me.lblPrefix.Font = CType(resources.GetObject("lblPrefix.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.lblPrefix, CType(resources.GetObject("lblPrefix.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.lblPrefix, CType(resources.GetObject("lblPrefix.IconPadding"), Integer))
        Me.lblPrefix.Image = CType(resources.GetObject("lblPrefix.Image"), System.Drawing.Image)
        Me.lblPrefix.ImageAlign = CType(resources.GetObject("lblPrefix.ImageAlign"), System.Drawing.ContentAlignment)
        Me.lblPrefix.ImageIndex = CType(resources.GetObject("lblPrefix.ImageIndex"), Integer)
        Me.lblPrefix.ImeMode = CType(resources.GetObject("lblPrefix.ImeMode"), System.Windows.Forms.ImeMode)
        Me.lblPrefix.Location = CType(resources.GetObject("lblPrefix.Location"), System.Drawing.Point)
        Me.lblPrefix.Name = "lblPrefix"
        Me.lblPrefix.RightToLeft = CType(resources.GetObject("lblPrefix.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.lblPrefix.Size = CType(resources.GetObject("lblPrefix.Size"), System.Drawing.Size)
        Me.lblPrefix.TabIndex = CType(resources.GetObject("lblPrefix.TabIndex"), Integer)
        Me.lblPrefix.Text = resources.GetString("lblPrefix.Text")
        Me.lblPrefix.TextAlign = CType(resources.GetObject("lblPrefix.TextAlign"), System.Drawing.ContentAlignment)
        Me.lblPrefix.Visible = CType(resources.GetObject("lblPrefix.Visible"), Boolean)
        '
        'txtPrefix
        '
        Me.txtPrefix.AccessibleDescription = resources.GetString("txtPrefix.AccessibleDescription")
        Me.txtPrefix.AccessibleName = resources.GetString("txtPrefix.AccessibleName")
        Me.txtPrefix.Anchor = CType(resources.GetObject("txtPrefix.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.txtPrefix.AutoSize = CType(resources.GetObject("txtPrefix.AutoSize"), Boolean)
        Me.txtPrefix.BackgroundImage = CType(resources.GetObject("txtPrefix.BackgroundImage"), System.Drawing.Image)
        Me.txtPrefix.Dock = CType(resources.GetObject("txtPrefix.Dock"), System.Windows.Forms.DockStyle)
        Me.txtPrefix.Enabled = CType(resources.GetObject("txtPrefix.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.txtPrefix, resources.GetString("txtPrefix.Error"))
        Me.txtPrefix.Font = CType(resources.GetObject("txtPrefix.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.txtPrefix, CType(resources.GetObject("txtPrefix.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.txtPrefix, CType(resources.GetObject("txtPrefix.IconPadding"), Integer))
        Me.txtPrefix.ImeMode = CType(resources.GetObject("txtPrefix.ImeMode"), System.Windows.Forms.ImeMode)
        Me.txtPrefix.Location = CType(resources.GetObject("txtPrefix.Location"), System.Drawing.Point)
        Me.txtPrefix.MaxLength = CType(resources.GetObject("txtPrefix.MaxLength"), Integer)
        Me.txtPrefix.Multiline = CType(resources.GetObject("txtPrefix.Multiline"), Boolean)
        Me.txtPrefix.Name = "txtPrefix"
        Me.txtPrefix.PasswordChar = CType(resources.GetObject("txtPrefix.PasswordChar"), Char)
        Me.txtPrefix.RightToLeft = CType(resources.GetObject("txtPrefix.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.txtPrefix.ScrollBars = CType(resources.GetObject("txtPrefix.ScrollBars"), System.Windows.Forms.ScrollBars)
        Me.txtPrefix.Size = CType(resources.GetObject("txtPrefix.Size"), System.Drawing.Size)
        Me.txtPrefix.TabIndex = CType(resources.GetObject("txtPrefix.TabIndex"), Integer)
        Me.txtPrefix.Text = resources.GetString("txtPrefix.Text")
        Me.txtPrefix.TextAlign = CType(resources.GetObject("txtPrefix.TextAlign"), System.Windows.Forms.HorizontalAlignment)
        Me.txtPrefix.Visible = CType(resources.GetObject("txtPrefix.Visible"), Boolean)
        Me.txtPrefix.WordWrap = CType(resources.GetObject("txtPrefix.WordWrap"), Boolean)
        '
        'lblNamespace
        '
        Me.lblNamespace.AccessibleDescription = resources.GetString("lblNamespace.AccessibleDescription")
        Me.lblNamespace.AccessibleName = resources.GetString("lblNamespace.AccessibleName")
        Me.lblNamespace.Anchor = CType(resources.GetObject("lblNamespace.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.lblNamespace.AutoSize = CType(resources.GetObject("lblNamespace.AutoSize"), Boolean)
        Me.lblNamespace.Dock = CType(resources.GetObject("lblNamespace.Dock"), System.Windows.Forms.DockStyle)
        Me.lblNamespace.Enabled = CType(resources.GetObject("lblNamespace.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.lblNamespace, resources.GetString("lblNamespace.Error"))
        Me.lblNamespace.Font = CType(resources.GetObject("lblNamespace.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.lblNamespace, CType(resources.GetObject("lblNamespace.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.lblNamespace, CType(resources.GetObject("lblNamespace.IconPadding"), Integer))
        Me.lblNamespace.Image = CType(resources.GetObject("lblNamespace.Image"), System.Drawing.Image)
        Me.lblNamespace.ImageAlign = CType(resources.GetObject("lblNamespace.ImageAlign"), System.Drawing.ContentAlignment)
        Me.lblNamespace.ImageIndex = CType(resources.GetObject("lblNamespace.ImageIndex"), Integer)
        Me.lblNamespace.ImeMode = CType(resources.GetObject("lblNamespace.ImeMode"), System.Windows.Forms.ImeMode)
        Me.lblNamespace.Location = CType(resources.GetObject("lblNamespace.Location"), System.Drawing.Point)
        Me.lblNamespace.Name = "lblNamespace"
        Me.lblNamespace.RightToLeft = CType(resources.GetObject("lblNamespace.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.lblNamespace.Size = CType(resources.GetObject("lblNamespace.Size"), System.Drawing.Size)
        Me.lblNamespace.TabIndex = CType(resources.GetObject("lblNamespace.TabIndex"), Integer)
        Me.lblNamespace.Text = resources.GetString("lblNamespace.Text")
        Me.lblNamespace.TextAlign = CType(resources.GetObject("lblNamespace.TextAlign"), System.Drawing.ContentAlignment)
        Me.lblNamespace.Visible = CType(resources.GetObject("lblNamespace.Visible"), Boolean)
        '
        'txtNamespace
        '
        Me.txtNamespace.AccessibleDescription = resources.GetString("txtNamespace.AccessibleDescription")
        Me.txtNamespace.AccessibleName = resources.GetString("txtNamespace.AccessibleName")
        Me.txtNamespace.Anchor = CType(resources.GetObject("txtNamespace.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.txtNamespace.AutoSize = CType(resources.GetObject("txtNamespace.AutoSize"), Boolean)
        Me.txtNamespace.BackgroundImage = CType(resources.GetObject("txtNamespace.BackgroundImage"), System.Drawing.Image)
        Me.txtNamespace.Dock = CType(resources.GetObject("txtNamespace.Dock"), System.Windows.Forms.DockStyle)
        Me.txtNamespace.Enabled = CType(resources.GetObject("txtNamespace.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.txtNamespace, resources.GetString("txtNamespace.Error"))
        Me.txtNamespace.Font = CType(resources.GetObject("txtNamespace.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.txtNamespace, CType(resources.GetObject("txtNamespace.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.txtNamespace, CType(resources.GetObject("txtNamespace.IconPadding"), Integer))
        Me.txtNamespace.ImeMode = CType(resources.GetObject("txtNamespace.ImeMode"), System.Windows.Forms.ImeMode)
        Me.txtNamespace.Location = CType(resources.GetObject("txtNamespace.Location"), System.Drawing.Point)
        Me.txtNamespace.MaxLength = CType(resources.GetObject("txtNamespace.MaxLength"), Integer)
        Me.txtNamespace.Multiline = CType(resources.GetObject("txtNamespace.Multiline"), Boolean)
        Me.txtNamespace.Name = "txtNamespace"
        Me.txtNamespace.PasswordChar = CType(resources.GetObject("txtNamespace.PasswordChar"), Char)
        Me.txtNamespace.RightToLeft = CType(resources.GetObject("txtNamespace.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.txtNamespace.ScrollBars = CType(resources.GetObject("txtNamespace.ScrollBars"), System.Windows.Forms.ScrollBars)
        Me.txtNamespace.Size = CType(resources.GetObject("txtNamespace.Size"), System.Drawing.Size)
        Me.txtNamespace.TabIndex = CType(resources.GetObject("txtNamespace.TabIndex"), Integer)
        Me.txtNamespace.Text = resources.GetString("txtNamespace.Text")
        Me.txtNamespace.TextAlign = CType(resources.GetObject("txtNamespace.TextAlign"), System.Windows.Forms.HorizontalAlignment)
        Me.txtNamespace.Visible = CType(resources.GetObject("txtNamespace.Visible"), Boolean)
        Me.txtNamespace.WordWrap = CType(resources.GetObject("txtNamespace.WordWrap"), Boolean)
        '
        'cboLocale
        '
        Me.cboLocale.AccessibleDescription = resources.GetString("cboLocale.AccessibleDescription")
        Me.cboLocale.AccessibleName = resources.GetString("cboLocale.AccessibleName")
        Me.cboLocale.Anchor = CType(resources.GetObject("cboLocale.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.cboLocale.BackgroundImage = CType(resources.GetObject("cboLocale.BackgroundImage"), System.Drawing.Image)
        Me.cboLocale.Dock = CType(resources.GetObject("cboLocale.Dock"), System.Windows.Forms.DockStyle)
        Me.cboLocale.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cboLocale.Enabled = CType(resources.GetObject("cboLocale.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.cboLocale, resources.GetString("cboLocale.Error"))
        Me.cboLocale.Font = CType(resources.GetObject("cboLocale.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.cboLocale, CType(resources.GetObject("cboLocale.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.cboLocale, CType(resources.GetObject("cboLocale.IconPadding"), Integer))
        Me.cboLocale.ImeMode = CType(resources.GetObject("cboLocale.ImeMode"), System.Windows.Forms.ImeMode)
        Me.cboLocale.IntegralHeight = CType(resources.GetObject("cboLocale.IntegralHeight"), Boolean)
        Me.cboLocale.ItemHeight = CType(resources.GetObject("cboLocale.ItemHeight"), Integer)
        Me.cboLocale.Location = CType(resources.GetObject("cboLocale.Location"), System.Drawing.Point)
        Me.cboLocale.MaxDropDownItems = CType(resources.GetObject("cboLocale.MaxDropDownItems"), Integer)
        Me.cboLocale.MaxLength = CType(resources.GetObject("cboLocale.MaxLength"), Integer)
        Me.cboLocale.Name = "cboLocale"
        Me.cboLocale.RightToLeft = CType(resources.GetObject("cboLocale.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.cboLocale.Size = CType(resources.GetObject("cboLocale.Size"), System.Drawing.Size)
        Me.cboLocale.TabIndex = CType(resources.GetObject("cboLocale.TabIndex"), Integer)
        Me.cboLocale.Text = resources.GetString("cboLocale.Text")
        Me.cboLocale.Visible = CType(resources.GetObject("cboLocale.Visible"), Boolean)
        '
        'lblLocale
        '
        Me.lblLocale.AccessibleDescription = resources.GetString("lblLocale.AccessibleDescription")
        Me.lblLocale.AccessibleName = resources.GetString("lblLocale.AccessibleName")
        Me.lblLocale.Anchor = CType(resources.GetObject("lblLocale.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.lblLocale.AutoSize = CType(resources.GetObject("lblLocale.AutoSize"), Boolean)
        Me.lblLocale.Dock = CType(resources.GetObject("lblLocale.Dock"), System.Windows.Forms.DockStyle)
        Me.lblLocale.Enabled = CType(resources.GetObject("lblLocale.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.lblLocale, resources.GetString("lblLocale.Error"))
        Me.lblLocale.Font = CType(resources.GetObject("lblLocale.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.lblLocale, CType(resources.GetObject("lblLocale.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.lblLocale, CType(resources.GetObject("lblLocale.IconPadding"), Integer))
        Me.lblLocale.Image = CType(resources.GetObject("lblLocale.Image"), System.Drawing.Image)
        Me.lblLocale.ImageAlign = CType(resources.GetObject("lblLocale.ImageAlign"), System.Drawing.ContentAlignment)
        Me.lblLocale.ImageIndex = CType(resources.GetObject("lblLocale.ImageIndex"), Integer)
        Me.lblLocale.ImeMode = CType(resources.GetObject("lblLocale.ImeMode"), System.Windows.Forms.ImeMode)
        Me.lblLocale.Location = CType(resources.GetObject("lblLocale.Location"), System.Drawing.Point)
        Me.lblLocale.Name = "lblLocale"
        Me.lblLocale.RightToLeft = CType(resources.GetObject("lblLocale.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.lblLocale.Size = CType(resources.GetObject("lblLocale.Size"), System.Drawing.Size)
        Me.lblLocale.TabIndex = CType(resources.GetObject("lblLocale.TabIndex"), Integer)
        Me.lblLocale.Text = resources.GetString("lblLocale.Text")
        Me.lblLocale.TextAlign = CType(resources.GetObject("lblLocale.TextAlign"), System.Drawing.ContentAlignment)
        Me.lblLocale.Visible = CType(resources.GetObject("lblLocale.Visible"), Boolean)
        '
        'chkCaseSensitive
        '
        Me.chkCaseSensitive.AccessibleDescription = resources.GetString("chkCaseSensitive.AccessibleDescription")
        Me.chkCaseSensitive.AccessibleName = resources.GetString("chkCaseSensitive.AccessibleName")
        Me.chkCaseSensitive.Anchor = CType(resources.GetObject("chkCaseSensitive.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.chkCaseSensitive.Appearance = CType(resources.GetObject("chkCaseSensitive.Appearance"), System.Windows.Forms.Appearance)
        Me.chkCaseSensitive.BackgroundImage = CType(resources.GetObject("chkCaseSensitive.BackgroundImage"), System.Drawing.Image)
        Me.chkCaseSensitive.CheckAlign = CType(resources.GetObject("chkCaseSensitive.CheckAlign"), System.Drawing.ContentAlignment)
        Me.chkCaseSensitive.Dock = CType(resources.GetObject("chkCaseSensitive.Dock"), System.Windows.Forms.DockStyle)
        Me.chkCaseSensitive.Enabled = CType(resources.GetObject("chkCaseSensitive.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.chkCaseSensitive, resources.GetString("chkCaseSensitive.Error"))
        Me.chkCaseSensitive.FlatStyle = CType(resources.GetObject("chkCaseSensitive.FlatStyle"), System.Windows.Forms.FlatStyle)
        Me.chkCaseSensitive.Font = CType(resources.GetObject("chkCaseSensitive.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me.chkCaseSensitive, CType(resources.GetObject("chkCaseSensitive.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.chkCaseSensitive, CType(resources.GetObject("chkCaseSensitive.IconPadding"), Integer))
        Me.chkCaseSensitive.Image = CType(resources.GetObject("chkCaseSensitive.Image"), System.Drawing.Image)
        Me.chkCaseSensitive.ImageAlign = CType(resources.GetObject("chkCaseSensitive.ImageAlign"), System.Drawing.ContentAlignment)
        Me.chkCaseSensitive.ImageIndex = CType(resources.GetObject("chkCaseSensitive.ImageIndex"), Integer)
        Me.chkCaseSensitive.ImeMode = CType(resources.GetObject("chkCaseSensitive.ImeMode"), System.Windows.Forms.ImeMode)
        Me.chkCaseSensitive.Location = CType(resources.GetObject("chkCaseSensitive.Location"), System.Drawing.Point)
        Me.chkCaseSensitive.Name = "chkCaseSensitive"
        Me.chkCaseSensitive.RightToLeft = CType(resources.GetObject("chkCaseSensitive.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.chkCaseSensitive.Size = CType(resources.GetObject("chkCaseSensitive.Size"), System.Drawing.Size)
        Me.chkCaseSensitive.TabIndex = CType(resources.GetObject("chkCaseSensitive.TabIndex"), Integer)
        Me.chkCaseSensitive.Text = resources.GetString("chkCaseSensitive.Text")
        Me.chkCaseSensitive.TextAlign = CType(resources.GetObject("chkCaseSensitive.TextAlign"), System.Drawing.ContentAlignment)
        Me.chkCaseSensitive.Visible = CType(resources.GetObject("chkCaseSensitive.Visible"), Boolean)
        '
        'lstPrimaryKey
        '
        Me.lstPrimaryKey.AccessibleDescription = resources.GetString("lstPrimaryKey.AccessibleDescription")
        Me.lstPrimaryKey.AccessibleName = resources.GetString("lstPrimaryKey.AccessibleName")
        Me.lstPrimaryKey.Anchor = CType(resources.GetObject("lstPrimaryKey.Anchor"), System.Windows.Forms.AnchorStyles)
        Me.lstPrimaryKey.BackgroundImage = CType(resources.GetObject("lstPrimaryKey.BackgroundImage"), System.Drawing.Image)
        Me.lstPrimaryKey.ColumnWidth = CType(resources.GetObject("lstPrimaryKey.ColumnWidth"), Integer)
        Me.lstPrimaryKey.Dock = CType(resources.GetObject("lstPrimaryKey.Dock"), System.Windows.Forms.DockStyle)
        Me.lstPrimaryKey.Enabled = CType(resources.GetObject("lstPrimaryKey.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me.lstPrimaryKey, resources.GetString("lstPrimaryKey.Error"))
        Me.lstPrimaryKey.Font = CType(resources.GetObject("lstPrimaryKey.Font"), System.Drawing.Font)
        Me.lstPrimaryKey.HorizontalExtent = CType(resources.GetObject("lstPrimaryKey.HorizontalExtent"), Integer)
        Me.lstPrimaryKey.HorizontalScrollbar = CType(resources.GetObject("lstPrimaryKey.HorizontalScrollbar"), Boolean)
        Me.ErrorProvider1.SetIconAlignment(Me.lstPrimaryKey, CType(resources.GetObject("lstPrimaryKey.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me.lstPrimaryKey, CType(resources.GetObject("lstPrimaryKey.IconPadding"), Integer))
        Me.lstPrimaryKey.ImeMode = CType(resources.GetObject("lstPrimaryKey.ImeMode"), System.Windows.Forms.ImeMode)
        Me.lstPrimaryKey.IntegralHeight = CType(resources.GetObject("lstPrimaryKey.IntegralHeight"), Boolean)
        Me.lstPrimaryKey.Location = CType(resources.GetObject("lstPrimaryKey.Location"), System.Drawing.Point)
        Me.lstPrimaryKey.Name = "lstPrimaryKey"
        Me.lstPrimaryKey.RightToLeft = CType(resources.GetObject("lstPrimaryKey.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.lstPrimaryKey.ScrollAlwaysVisible = CType(resources.GetObject("lstPrimaryKey.ScrollAlwaysVisible"), Boolean)
        Me.lstPrimaryKey.Size = CType(resources.GetObject("lstPrimaryKey.Size"), System.Drawing.Size)
        Me.lstPrimaryKey.TabIndex = CType(resources.GetObject("lstPrimaryKey.TabIndex"), Integer)
        Me.lstPrimaryKey.Visible = CType(resources.GetObject("lstPrimaryKey.Visible"), Boolean)
        '
        'ErrorProvider1
        '
        Me.ErrorProvider1.ContainerControl = Me
        Me.ErrorProvider1.Icon = CType(resources.GetObject("ErrorProvider1.Icon"), System.Drawing.Icon)
        '
        'UDataTable
        '
        Me.AccessibleDescription = resources.GetString("$this.AccessibleDescription")
        Me.AccessibleName = resources.GetString("$this.AccessibleName")
        Me.AutoScroll = CType(resources.GetObject("$this.AutoScroll"), Boolean)
        Me.AutoScrollMargin = CType(resources.GetObject("$this.AutoScrollMargin"), System.Drawing.Size)
        Me.AutoScrollMinSize = CType(resources.GetObject("$this.AutoScrollMinSize"), System.Drawing.Size)
        Me.BackgroundImage = CType(resources.GetObject("$this.BackgroundImage"), System.Drawing.Image)
        Me.Controls.Add(Me.lstPrimaryKey)
        Me.Controls.Add(Me.txtTableName)
        Me.Controls.Add(Me.lblTableName)
        Me.Controls.Add(Me.lblPrimaryKey)
        Me.Controls.Add(Me.nudMinimumCapacity)
        Me.Controls.Add(Me.lblMinimumCapacity)
        Me.Controls.Add(Me.lblPrefix)
        Me.Controls.Add(Me.txtNamespace)
        Me.Controls.Add(Me.txtPrefix)
        Me.Controls.Add(Me.chkCaseSensitive)
        Me.Controls.Add(Me.lblLocale)
        Me.Controls.Add(Me.lblNamespace)
        Me.Controls.Add(Me.cboLocale)
        Me.Enabled = CType(resources.GetObject("$this.Enabled"), Boolean)
        Me.ErrorProvider1.SetError(Me, resources.GetString("$this.Error"))
        Me.Font = CType(resources.GetObject("$this.Font"), System.Drawing.Font)
        Me.ErrorProvider1.SetIconAlignment(Me, CType(resources.GetObject("$this.IconAlignment"), System.Windows.Forms.ErrorIconAlignment))
        Me.ErrorProvider1.SetIconPadding(Me, CType(resources.GetObject("$this.IconPadding"), Integer))
        Me.ImeMode = CType(resources.GetObject("$this.ImeMode"), System.Windows.Forms.ImeMode)
        Me.Location = CType(resources.GetObject("$this.Location"), System.Drawing.Point)
        Me.Name = "UDataTable"
        Me.RightToLeft = CType(resources.GetObject("$this.RightToLeft"), System.Windows.Forms.RightToLeft)
        Me.Size = CType(resources.GetObject("$this.Size"), System.Drawing.Size)
        CType(Me.nudMinimumCapacity, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

#End Region

    Public Event ValueChanged As EventHandler

    Private Sub UDataTable_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        AddHandler txtTableName.TextChanged, AddressOf OnValueChanged
        AddHandler nudMinimumCapacity.ValueChanged, AddressOf OnValueChanged : AddHandler nudMinimumCapacity.TextChanged, AddressOf OnValueChanged
        AddHandler chkCaseSensitive.CheckedChanged, AddressOf OnValueChanged
        AddHandler cboLocale.SelectionChangeCommitted, AddressOf OnValueChanged
        AddHandler txtNamespace.TextChanged, AddressOf OnValueChanged
        AddHandler txtPrefix.TextChanged, AddressOf OnValueChanged
    End Sub

    Private Sub txtTableName_Validated(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtTableName.Validated
        If txtTableName.Text = "" Then
            ErrorProvider1.SetError(txtTableName, "Table Name is required.")
        Else
            ErrorProvider1.SetError(txtTableName, "")
        End If
    End Sub
    Private Sub lstPrimaryKey_ItemCheck(ByVal sender As Object, ByVal e As System.Windows.Forms.ItemCheckEventArgs) Handles lstPrimaryKey.ItemCheck
        OnValueChanged(Me, New EventArgs)
    End Sub

    Protected Sub OnValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
        RaiseEvent ValueChanged(Me, New EventArgs)
    End Sub

    Public Sub Prepare()
        cboLocale.Items.Clear()

        Dim ci As Globalization.CultureInfo
        For Each ci In Globalization.CultureInfo.GetCultures(Globalization.CultureTypes.AllCultures)
            cboLocale.Items.Add(ci)
        Next ci
    End Sub

    Public Sub Read(ByVal table As Model10.Table)
        Dim dc As DataColumn
        '-------------------
        lstPrimaryKey.Items.Clear()

        For Each dc In table.DataTable.Columns
            lstPrimaryKey.Items.Add(dc)
        Next : dc = Nothing
        '-------------------
        txtTableName.Text = table.Name
        nudMinimumCapacity.Value = table.DataTable.MinimumCapacity
        chkCaseSensitive.Checked = table.DataTable.CaseSensitive
        '-------------------
        For Each dc In table.DataTable.PrimaryKey
            lstPrimaryKey.SetItemChecked(lstPrimaryKey.Items.IndexOf(dc), True)
        Next : dc = Nothing
        '-------------------
        cboLocale.SelectedItem = table.DataTable.Locale
        txtNamespace.Text = table.DataTable.Namespace
        txtPrefix.Text = table.DataTable.Prefix
    End Sub
    Public Sub Write(ByVal table As Model10.Table)
        table.Name = txtTableName.Text
        table.DataTable.MinimumCapacity = CInt(nudMinimumCapacity.Value)
        table.DataTable.CaseSensitive = chkCaseSensitive.Checked
        '-------------------
        Dim pk() As DataColumn

        Dim i As Integer
        For i = 0 To lstPrimaryKey.CheckedItems.Count - 1
            Dim dc As DataColumn = CType(lstPrimaryKey.CheckedItems(i), DataColumn)
            If table.DataTable Is dc.Table Then
                ReDim Preserve pk(i)
                pk(i) = dc
            End If
            dc = Nothing
        Next

        table.DataTable.PrimaryKey = pk : pk = Nothing
        '-------------------
        table.DataTable.Locale = CType(cboLocale.SelectedItem, Globalization.CultureInfo)
        table.DataTable.Namespace = txtNamespace.Text
        table.DataTable.Prefix = txtPrefix.Text
    End Sub
End Class